home *** CD-ROM | disk | FTP | other *** search
/ Developer CD Series 1999 May: Tool Chest / Developer CD Series Tool Chest (Apple Computer)(May 1999).iso / Tool Chest / Development Kits / MPW etc / MPW-GM / MPW / Examples / PPCExamples / CPlusExamples / CPlusTESample / CPlusTESample.make < prev    next >
Encoding:
Text File  |  1998-12-03  |  4.2 KB  |  142 lines  |  [TEXT/MPS ]

  1. #------------------------------------------------------------------------------
  2. #
  3. #    MultiFinder-Aware Simple TextEdit Sample Application
  4. #
  5. #    CPlusTESample
  6. #
  7. #    This file: CPlusTESample.make    -    Make source
  8. #
  9. #    Copyright © 1989-1995  Apple Computer, Inc.
  10. #    All rights reserved.
  11. #
  12. #------------------------------------------------------------------------------
  13.  
  14.  
  15. ### added 2 new defines to avoid conflict with MacApp variables        920225 rjd
  16. ### altered makefile to work with Macintosh on RISC SDK                930629 jma
  17. ### Altered makefile to build 68K, Power Mac and FAT versions.            940112 fpf
  18. ### Corrected minor nits in build process                               950109 gab
  19.  
  20. #------------------------------------------------------------------------------
  21.  
  22. AppName    =        CPlusTESample
  23. Creator =        '????'
  24. Type    =        'APPL'
  25.  
  26. SymOpt = off    
  27. PPCCOptimize = local
  28.  
  29. Source_Folder = :
  30.  
  31. 68K_Object_Folder = :68KObjects:
  32.  
  33. PPC_Object_Folder = :PPCObjects:
  34.  
  35. {68K_Object_Folder} ƒ {Source_Folder}
  36.  
  37. {PPC_Object_Folder} ƒ {Source_Folder}
  38.  
  39. PPC_Objects =     {PPC_Object_Folder}TESample.cp.ppc.o ∂
  40.                 {PPC_Object_Folder}TApplication.cp.ppc.o ∂
  41.                 {PPC_Object_Folder}TDocument.cp.ppc.o ∂
  42.                 {PPC_Object_Folder}TEDocument.cp.ppc.o
  43.                 
  44. 68K_Objects =     {68K_Object_Folder}TESample.cp.68k.o ∂
  45.                 {68K_Object_Folder}TApplication.cp.68k.o ∂
  46.                 {68K_Object_Folder}TDocument.cp.68k.o ∂
  47.                 {68K_Object_Folder}TEDocument.cp.68k.o ∂
  48.                 {68K_Object_Folder}TESampleGlue.a.68k.o  # In assembler on 68K,
  49.                                                          # in C for Power Mac.
  50.  
  51. PPCC_Options =     -sym {SymOpt} -opt {PPCCOptimize} -D OLDROUTINELOCATIONS=0
  52.  
  53. CPlus_Options = -sym {SymOpt} -D OLDROUTINELOCATIONS=0  # Use universal headers for 68K build.
  54.  
  55. PPC_Libraries =    "{SharedLibraries}"InterfaceLib    ∂
  56.                 "{SharedLibraries}"MathLib        ∂
  57.                 "{SharedLibraries}"StdCLib        ∂
  58.                 "{PPCLibraries}"StdCRuntime.o    ∂
  59.                 "{PPCLibraries}"PPCCRuntime.o    ∂
  60.                 "{PPCLibraries}"MrCPlusLib.o
  61.                 
  62. 68K_Libraries = "{CLibraries}"CPlusLib.o ∂
  63.                 "{CLibraries}"StdCLib.o  ∂
  64.                  "{Libraries}"MacRuntime.o   ∂
  65.                  "{Libraries}"Interface.o 
  66.                     
  67. 68K_Resources =    TESample.r
  68.  
  69. PPC_Resources = {68K_Resources} PPCApp.r
  70.  
  71. Headers    =        TESample.h                 ∂
  72.                 TApplicationCommon.h    ∂
  73.                 TApplication.h             ∂
  74.                 TDocument.h                ∂
  75.                 TEDocument.h            ∂
  76.                 TECommon.h
  77.                     
  78. Makefile =        {AppName}.make
  79.  
  80. C =                SC
  81.  
  82. CPlus =            SCpp  # Note that not everyone has a 68K C++ compiler
  83.  
  84. PPCC =             MrCpp
  85.  
  86. #------------------------------------------------------------------------------
  87.         
  88. .cp.ppc.o    ƒ    .cp {Makefile}        # Whenever the Makefile changes, all .o's get built.
  89.     {PPCC} {PPCC_Options} {default}.cp -o {Targ}
  90.  
  91. .cp.68k.o    ƒ    .cp {Makefile}        # Whenever the Makefile changes, all .o's get built.
  92.     {CPlus} {CPlus_Options} {default}.cp -o {Targ}
  93.  
  94. .a.68k.o    ƒ    .a {Makefile}         # Whenever the Makefile changes, all .o's get built.
  95.     {Asm} {default}.a -o {Targ}
  96.  
  97. #------------------------------------------------------------------------------
  98.         
  99. {AppName}    ƒ {AppName}.ppc {AppName}.68K
  100.     # Duplicate the Power Mac code into the fat binary package.
  101.     duplicate -y {AppName}.ppc {Targ}
  102.     # rez in 'CODE' resources from 68K version.  (Brute force method).
  103.     Echo "include ∂"{AppName}.68K∂" 'CODE';" | rez -a -o {Targ}
  104.  
  105. {AppName}.ppc ƒƒ {PPC_Objects}
  106.     PPCLink -warn -main __cplusstart ∂
  107.         {PPC_Objects}                 ∂
  108.         {PPC_Libraries}                 ∂
  109.         -sym {SymOpt}                 ∂
  110.         -o {Targ}
  111.     SetFile {AppName}.ppc -t {Type} -c {Creator} -a Bi 
  112.     rez -append -o {Targ} {PPC_Resources}        
  113.  
  114. {AppName}.68K ƒƒ {68K_Objects}
  115.     Link -d -t {Type} -c {Creator} ∂
  116.         {68K_Objects}             ∂
  117.         {68K_Libraries}            ∂
  118.         -o {Targ}
  119.     rez -append -o {Targ} {68K_Resources}
  120.     setfile -a Bi {Targ}   # Make the system aware that we have a BNDL resource.
  121.  
  122. #------------------------------------------------------------------------------
  123. #  Low level dependencies.
  124.  
  125. TApplication.cp.68k.o ƒƒ TApplication.cp TApplication.h TApplicationCommon.h
  126.  
  127. TDocument.cp.68k.o     ƒƒ TDocument.cp    TDocument.h
  128.  
  129. TEDocument.cp.68k.o    ƒƒ TEDocument.cp   TEDocument.h
  130.  
  131. TESample.cp.68k.o     ƒƒ TESample.cp     {Headers}
  132.  
  133.  
  134. TApplication.cp.ppc.o ƒƒ TApplication.cp TApplication.h TApplicationCommon.h
  135.  
  136. TDocument.cp.ppc.o     ƒƒ TDocument.cp    TDocument.h
  137.  
  138. TEDocument.cp.ppc.o    ƒƒ TEDocument.cp   TEDocument.h
  139.  
  140. TESample.cp.ppc.o     ƒƒ TESample.cp     {Headers}
  141.  
  142.